#ifndef CSOIL_HEADER
#define CSOIL_HEADER

#include "stb_image_aug.h"
#include "image_helper.h"
#include "image_DXT.h"

/**
	The format of images that may be loaded (force_channels).
	SOIL_LOAD_AUTO leaves the image in whatever format it was found.
	SOIL_LOAD_L forces the image to load as Luminous (greyscale)
	SOIL_LOAD_LA forces the image to load as Luminous with Alpha
	SOIL_LOAD_RGB forces the image to load as Red Green Blue
	SOIL_LOAD_RGBA forces the image to load as Red Green Blue Alpha
**/

enum
{
	SOIL_LOAD_AUTO = 0,
	SOIL_LOAD_L = 1,
	SOIL_LOAD_LA = 2,
	SOIL_LOAD_RGB = 3,
	SOIL_LOAD_RGBA = 4
};

class CSOIL
{
	static CSOIL * instance;
	char * result_string_pointer;

public:
	CSOIL (){};
	~CSOIL ()
	{
		if(instance != 0)
			delete instance;
	};

	static CSOIL * GetInstance ()
	{
		if(instance == 0)
			instance = new CSOIL();
		return instance;
	}
	/**
		Loads an image from disk into an array of unsigned chars.
		Note that *channels return the original channel count of the
		image.  If force_channels was other than SOIL_LOAD_AUTO,
		the resulting image has force_channels, but *channels may be
		different (if the original image had a different channel
		count).
		\return 0 if failed, otherwise returns 1
	**/
	unsigned char*
		SOIL_load_image
		(
			const char *filename,
			int *width, int *height, int *channels,
			int force_channels
		);


	/**
		Frees the image data (note, this is just C's "free()"...this function is
		present mostly so C++ programmers don't forget to use "free()" and call
		"delete []" instead [8^)
	**/
	void
		SOIL_free_image_data
		(
			unsigned char *img_data
		);

	/**
		This function resturn a pointer to a string describing the last thing
		that happened inside SOIL.  It can be used to determine why an image
		failed to load.
	**/

};

#endif /* HEADER_SIMPLE_OPENGL_IMAGE_LIBRARY	*/
